#include "Grabber.h"


Grabber::Grabber(unsigned int channel, bool isGrabbed)
{
	m_relay     = new Relay(channel);
	m_isGrabbed = isGrabbed;
}

Grabber::~Grabber(void)
{
	delete m_relay;
}
	
void
Grabber::Grab(void)
{
	m_relay->Set(m_relay->kForward);
	m_isGrabbed = true;
}

void
Grabber::Release(void)
{
	m_relay->Set(m_relay->kReverse);
	m_isGrabbed = false;
}

bool
Grabber::IsGrabbed(void)
{
	return m_isGrabbed;
}
